3f01f1063931bb44440e4161eafb803aea45786e,src/main/java/org/aksw/agdistis/experiment/TextDisambiguation.java,TextDisambiguation,main,#String[]#,19

Before Change


	public static void main(String[] args) throws IOException {
		String languageTag = "en"; // de
		File dataDirectory = new File("/data/r.usbeck/index_dbpedia_39_en"); // "/Users/ricardousbeck";
		String nodeType = "http://dbpedia.org/resource/";// "http://yago-knowledge.org/resource/"
		String edgeType = "http://dbpedia.org/ontology/";// "http://yago-knowledge.org/resource/"

		for (String TestFile : new String[] { "datasets/reuters.xml", "datasets/500newsgoldstandard.xml" }) {
			// "german_corpus_new.xml"
			// "datasets/test.xml", "datasets/AIDACorpus.xml"

			CorpusXmlReader reader = new CorpusXmlReader(new File(TestFile));
			Corpus corpus = reader.getCorpus();
			log.info("Corpus size: " + corpus.getNumberOfDocuments());

			DisambiguationAlgorithm algo = new NEDAlgo_HITS(dataDirectory, nodeType, edgeType);
			// DisambiguationAlgorithm algo = new NEDAIDADisambiguator();
			// DisambiguationAlgorithm algo = new NEDSpotlightPoster();

			for (int maxDepth = 1; maxDepth <= 3; ++maxDepth) {
				BufferedWriter bw = new BufferedWriter(new FileWriter("Test_" + TestFile.replace("datasets/", "") + "_" + maxDepth + "_12Nov13.txt", true));
				bw.write("input: " + TestFile + "\n");

				algo.setMaxDepth(maxDepth);
				for (double threshholdTrigram = 1; threshholdTrigram > 0.0; threshholdTrigram -= 0.01) {
					algo.setThreshholdTrigram(threshholdTrigram);

					Evaluator ev = new Evaluator(languageTag, corpus, algo);
					ev.fmeasure();
					ev.writeFmeasureToFile(bw);

					System.gc();

After Change


			// DisambiguationAlgorithm algo = new NEDAlgo_HITS(dataDirectory,
			// nodeType, edgeType);
//			 DisambiguationAlgorithm algo = new NEDAIDADisambiguator();
			DisambiguationAlgorithm algo = new NEDSpotlightPoster();

			// for (int maxDepth = 2; maxDepth <= 2; ++maxDepth) {
			BufferedWriter bw = new BufferedWriter(new FileWriter("SPOTLIGHT" + TestFile.replace("datasets/", "") + "_" + "_08Jan14.txt", true));
			bw.write("input: " + TestFile + "\n");

			// algo.setMaxDepth(maxDepth);
			// for (double threshholdTrigram = 1; threshholdTrigram > 0.8;
			// threshholdTrigram -= 0.01) {
			// algo.setThreshholdTrigram(threshholdTrigram);

			Evaluator ev = new Evaluator(languageTag, corpus, algo);
			ev.fmeasure();
//			ev.writeFmeasureToFile(bw);

			System.gc();